package com.maybach.common.templates;

import com.maybach.common.VO.ContractVO;
import lombok.Data;

/**
 * Created by songshuang on 16/3/9.
 */
@Data
public class ContractTemplate {

    private String template;

    public ContractTemplate (ContractVO contractVO) {

        this.template = "<!DOCTYPE html>\n" +
                "<html>\n" +
                "<head>\n" +
                "  <meta charset=\"utf-8\"/>\n" +
                "<style>\n" +
                "body {\n" +
                "  font-family: SimSun, Arial\n" +
                "}\n" +
                ".delegate-letter, .purchaseContract {\n" +
                "    width: 726px;\n" +
                "    background-color: #fff;\n" +
                "    margin: 0 auto;\n" +
                "    font-size: 16px;\n" +
                "}\n" +
                ".delegate-letter h1 {\n" +
                "    text-align: center;\n" +
                "    line-height: 100px;\n" +
                "    font-size: 32px;\n" +
                "    font-weight: normal;\n" +
                "}\n" +
                ".delegate-letter h2, .purchaseContract h2 {\n" +
                "    font-size: 24px;\n" +
                "    height: 40px;\n" +
                "}\n" +
                "\n" +
                ".delegate-letter .title2 {\n" +
                "    text-align: left;\n" +
                "    text-decoration: underline;\n" +
                "    font-size: 24px;\n" +
                "}\n" +
                ".delegate-letter p {\n" +
                "    line-height: 40px;\n" +
                "}\n" +
                ".underline-text {\n" +
                "    border-top:0;\n" +
                "    border-right: 0;\n" +
                "    border-left: 0;\n" +
                "    border-bottom: 1px solid #333;\n" +
                "    width: 200px;\n" +
                "    display: inline-block;\n" +
                "}\n" +
                "\n" +
                ".blank-text {\n" +
                "    border:0;\n" +
                "    display: inline-block;\n" +
                "    width: 35%;\n" +
                "}\n" +
                ".blank-text-s {\n" +
                "    border:0;\n" +
                "    width: 50px;\n" +
                "    display: inline-block;\n" +
                "}\n" +
                ".purchaseContract table {\n" +
                "    margin-left: 20px;\n" +
                "}\n" +
                "\n" +
                ".purchaseContract table th, .purchaseContract table td {\n" +
                "    text-align: center;\n" +
                "    font-size: 13px;\n" +
                "    font-weight: normal;\n" +
                "    padding: 10px;\n" +
                "    border:1px solid #555;\n" +
                "}\n" +
                "\n" +
                "td.red-col {\n" +
                "    color: #c00;\n" +
                "    font-size: 12px;\n" +
                "}\n" +
                ".purchaseContract p {\n" +
                "    text-indent: 33px;\n" +
                "}\n" +
                "\n" +
                "/* 清除浮动 */\n" +
                ".clearfix:after {\n" +
                "    visibility: hidden;\n" +
                "    display: block;\n" +
                "    font-size: 0;\n" +
                "    content: \" \";\n" +
                "    clear: both;\n" +
                "    height: 0;\n" +
                "}\n" +
                "\n" +
                ".clearfix {\n" +
                "    zoom: 1; /* for IE6 IE7 */\n" +
                "}\n" +
                "</style>\n" +
                "</head>\n" +
                "<body>\n" +
                "<div class=\"delegate-letter\">\n" +
                "    <span style=\"text-align: right;display: block;margin: 50px 100px 0 0;\">合同号：</span>\n" +
                "\n" +
                "    <h1>车辆代购服务合同</h1>\n" +
                "</div>\n" +
                "<div class=\"purchaseContract clearfix\">\n" +
                "    <p>甲方：<input type=\"text\" class=\"blank-text\" /></p>\n" +
                "\n" +
                "    <p>乙方：<input type=\"text\" class=\"blank-text\" /> (经销商)</p>\n" +
                "    <br/>\n" +
                "\n" +
                "    <p>丙方：<input type=\"text\" class=\"blank-text\" /> (资金方)</p>\n" +
                "\n" +
                "    <p>鉴于甲乙双方已经签订“汽车代购服务框架协议”（合同编号），经甲乙双方协商一致，就甲方为乙方提供车辆代购服务的事宜作出如下约定：</p>\n" +
                "    <br/>\n" +
                "\n" +
                "    <h2 class=\"title2\">一.代购服务</h2>\n" +
                "\n" +
                "    <p style=\"text-indent: 33px;margin: 30px 0;padding-left: 20px\">\n" +
                "        合同号：车辆代购服务合同甲方：乙方：（经销商）丙方：（资金方）鉴于甲乙双方已经签订“汽车代购服务框架协议”（合同编号），经甲乙双方协商一致，就甲方为乙方提供车辆代购服务的事宜作出如下约定：一.代购服务</p>\n" +
                "\n" +
                "    <h2 class=\"title2\">二.代购车辆及交付信息</h2>\n" +
                "    <br/>\n" +
                "    <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n" +
                "        <colgroup>\n" +
                "            <col width=\"6%\"></col>\n" +
                "            <col width=\"20%\"></col>\n" +
                "            <col width=\"10%\"></col>\n" +
                "            <col width=\"23%\"></col>\n" +
                "            <col width=\"20%\"></col>\n" +
                "            <col width=\"23%\"></col>\n" +
                "        </colgroup>\n" +
                "        <tbody>\n" +
                "        <tr>\n" +
                "            <th rowspan=\"3\">车辆信息</th>\n" +
                "            <th>车辆品牌型号</th>\n" +
                "            <td colspan=\"2\">"+ contractVO.getModelName() +"</td>\n" +
                "            <th>价格</th>\n" +
                "            <td>"+ contractVO.getPrice() +"</td>\n" +
                "        </tr>\n" +
                "        <tr>\n" +
                "            <th>外观颜色</th>\n" +
                "            <td colspan=\"2\">"+ contractVO.getOutColor() +"</td>\n" +
                "            <th>内饰颜色</th>\n" +
                "            <td>"+ contractVO.getInnerColor() +"</td>\n" +
                "        </tr>\n" +
                "        <tr>\n" +
                "            <th>备注</th>\n" +
                "            <td colspan=\"4\" class=\"red-col\">附《汽车采购合同》</td>\n" +
                "        </tr>\n" +
                "        <tr>\n" +
                "            <th rowspan=\"6\">垫付信息</th>\n" +
                "            <th>定金支付金额</th>\n" +
                "            <td colspan=\"2\" class=\"red-col\">附上定金支付凭证（水单照片）</td>\n" +
                "            <th>定金支付时间</th>\n" +
                "            <td>"+ contractVO.getDepositTime() +"</td>\n" +
                "        </tr>\n" +
                "        <tr>\n" +
                "            <th>垫款总额</th>\n" +
                "            <td colspan=\"2\">"+ contractVO.getLoanAmount() +"</td>\n" +
                "            <th>垫款起始日期</th>\n" +
                "            <td>"+ contractVO.getLoanStartTime() +"</td>\n" +
                "        </tr>\n" +
                "        <tr>\n" +
                "            <th>供应商全称</th>\n" +
                "            <td colspan=\"2\">"+ contractVO.getProviderName() +"</td>\n" +
                "            <th>保证金支付金额</th>\n" +
                "            <td>"+ contractVO.getMarginAmount() +"</td>\n" +
                "        </tr>\n" +
                "        <tr>\n" +
                "            <th rowspan=\"2\">供应商收款账户</th>\n" +
                "            <th>公户</th>\n" +
                "            <td>"+ contractVO.getSupplierPublicAccount() +"</td>\n" +
                "            <th>金额</th>\n" +
                "            <td>"+ contractVO.getSupplierAmount() +"</td>\n" +
                "        </tr>\n" +
                "        <tr>\n" +
                "            <th>私户户</th>\n" +
                "            <td>"+ contractVO.getSupplierPrivateAccount() +"</td>\n" +
                "            <th>金额</th>\n" +
                "            <td>"+ contractVO.getSupplierPrivateAmount() +"</td>\n" +
                "        </tr>\n" +
                "        <tr>\n" +
                "            <th>保证金支付金额</th>\n" +
                "            <td colspan=\"4\" class=\"red-col\"> 附上保证金支付凭证（水单），《代付款证明》</td>\n" +
                "        </tr>\n" +
                "\n" +
                "        <tr>\n" +
                "            <th rowspan=\"3\">物流信息</th>\n" +
                "            <th>物流提车时间</th>\n" +
                "            <td colspan=\"2\"></td>\n" +
                "            <th>物流提车地点</th>\n" +
                "            <td></td>\n" +
                "        </tr>\n" +
                "        <tr>\n" +
                "            <th>物流目的城市</th>\n" +
                "            <td colspan=\"2\"></td>\n" +
                "            <th>物流公司全称</th>\n" +
                "            <td></td>\n" +
                "        </tr>\n" +
                "        <tr>\n" +
                "            <th>物流费用</th>\n" +
                "            <td colspan=\"2\" class=\"red-col\">附物流费支付凭证（水单）</td>\n" +
                "            <th>物流联系人</th>\n" +
                "            <td>"+ contractVO.getShippingContacts() +"</td>\n" +
                "        </tr>\n" +
                "        <tr>\n" +
                "            <th>发票类型</th>\n" +
                "            <td colspan=\"5\"> [    ]增值税专用发票（增票）                [    ]机动车销售统一发票（用户票）；</td>\n" +
                "        </tr>\n" +
                "        </tbody>\n" +
                "    </table>\n" +
                "\n" +
                "    <br/>\n" +
                "\n" +
                "    <h2 class=\"title2\">三.代购垫资及代购服务</h2>\n" +
                "\n" +
                "    <div style=\"padding-left: 20px\">\n" +
                "        <p>甲、乙、丙三方约定一致，由丙方为乙方此次购车提供垫资服务，垫资起始日以丙方或甲方款项汇入乙方指定汽车供应商账户之日起，至乙方支付车辆总款之日止。</p>\n" +
                "\n" +
                "        <p>丙方为乙方提供的代购垫资由甲方进行代收代付，垫资产生的资金成本由乙方承担。</p>\n" +
                "\n" +
                "        <p>乙方应当为甲方提供的代购及服务支付服务费用。</p>\n" +
                "\n" +
                "        <p> 资金成本、逾期责任、代购服务费：按照双方签署的“汽车代购服务框架协议”执行。</p>\n" +
                "\n" +
                "        <p> 车辆交接：按照双方签署的“汽车代购服务框架协议”执行。</p>\n" +
                "    </div>\n" +
                "    <br />\n" +
                "    <h2 class=\"title2\">四.附件和发送确认</h2>\n" +
                "    <p>本协议只有在附件齐全且甲方认可时方可生效。</p>\n" +
                "    <table>\n" +
                "        <thead>\n" +
                "        <tr>\n" +
                "            <th>附件名称</th>\n" +
                "            <th>内容</th>\n" +
                "        </tr>\n" +
                "        </thead>\n" +
                "        <tbody>\n" +
                "        <tr>\n" +
                "            <td>车辆采购协议</td>\n" +
                "            <td>供应商版本且采购人为甲方</td>\n" +
                "        </tr>\n" +
                "        <tr>\n" +
                "            <td>代付款证明</td>\n" +
                "            <td>采购订单支付凭证</td>\n" +
                "        </tr>\n" +
                "        <tr>\n" +
                "            <td>保证金支付证明</td>\n" +
                "            <td>保证金支付的水单</td>\n" +
                "        </tr>\n" +
                "        </tbody>\n" +
                "    </table>\n" +
                "    <br />\n" +
                "    <p>按照双方签署的“汽车代购服务框架协议”，本协议和相关附件，通过约定邮箱发送和接受。</p>\n" +
                "    <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n" +
                "        <tbody>\n" +
                "        <tr>\n" +
                "            <th width=\"30%\">甲方邮件地址</th>\n" +
                "            <td> "+ contractVO.getPartAEmail() +" </td>\n" +
                "        </tr>\n" +
                "        <tr>\n" +
                "            <th width=\"30%\">乙方邮件地址</th>\n" +
                "            <td> "+ contractVO.getPartBEmail() +" </td>\n" +
                "        </tr>\n" +
                "        </tbody>\n" +
                "    </table>\n" +
                "    <br />\n" +
                "    <h2 class=\"title2\">五.其他</h2>\n" +
                "    <p>本协议未尽事项及争议、管辖、不可抗力等条款见甲乙双方“服务框架协议”约定的内容。</p>\n" +
                "    <br />\n" +
                "    <input type=\"text\" style=\"float: right;border:none;border-top:1px solid #555;display: inline-block;width:50%;\" />\n" +
                "    <div style=\"float: left;width:380px;\">\n" +
                "        <p>甲方：杭州一骑轻尘信息技术有限公司</p>\n" +
                "        <p>法人：李研珠</p>\n" +
                "        <p>盖章：<input type=\"text\" class=\"blank-text\" /></p>\n" +
                "        <p>签约时间：<input type=\"text\" class=\"blank-text-s\" /> 年<input type=\"text\" class=\"blank-text-s\" /> 月<input type=\"text\" class=\"blank-text-s\" /> 日</p>\n" +
                "    </div>\n" +
                "    <div>\n" +
                "        <p>乙方：<input type=\"text\" class=\"blank-text\" /></p>\n" +
                "        <p>法人：<input type=\"text\" class=\"blank-text\" /></p>\n" +
                "        <p>盖章：<input type=\"text\" class=\"blank-text\" /></p>\n" +
                "        <p>签约时间：<input type=\"text\" class=\"blank-text-s\" /> 年<input type=\"text\" class=\"blank-text-s\" /> 月<input type=\"text\" class=\"blank-text-s\" /> 日</p>\n" +
                "    </div>\n" +
                "    <div style=\"width: 100%;border-top: 1px solid #555;margin: 20px 0;padding: 20px 0;\">\n" +
                "        <p>丙方：<input type=\"text\" class=\"blank-text\" /></p>\n" +
                "        <p>法人：<input type=\"text\" class=\"blank-text\" /></p>\n" +
                "        <p>盖章：<input type=\"text\" class=\"blank-text\" /></p>\n" +
                "        <p>签约时间：<input type=\"text\" class=\"blank-text-s\" /> 年<input type=\"text\" class=\"blank-text-s\" /> 月<input type=\"text\" class=\"blank-text-s\" /> 日</p>\n" +
                "    </div>\n" +
                "    <input type=\"text\" style=\"float: right;border:none;border-top:1px solid #555;display: inline-block;width:50%;\" />\n" +
                "</div>\n" +
                "</body>\n" +
                "</html>\n";
    }
}
